<?php
require ('../include/init.inc.php');
$method = $machine_id = $page_no='';
extract ( $_GET, EXTR_IF_EXISTS );


$machineConsumables = MachineConsumables::getMachinesConsumablesUsage($condition);

$row_count = count ($machineConsumables);


$page_size = PAGE_SIZE;
$page_no=$page_no<1?1:$page_no;

$total_page=$row_count%$page_size==0?$row_count/$page_size:ceil($row_count/$page_size);
$total_page=$total_page<1?1:$total_page;
$page_no=$page_no>($total_page)?($total_page):$page_no;

$start = ($page_no - 1) * $page_size;

$page_html=Pagination::showPager("consumable_alarm.php",$page_no,PAGE_SIZE,$row_count);

Template::assign ( 'page_no', $page_no );
Template::assign ( 'page_size', PAGE_SIZE );
Template::assign ( 'row_count', $row_count );
Template::assign ( 'page_html', $page_html );

Template::assign ( 'Consumables', $machineConsumables );

Template::display ( 'panel/consumable_alarm.tpl' );


